package com.product.android.commonInterface.chat;

import com.product.android.business.config.Configuration;


public class ChatGroup {

	public static final int GROUP_TYPE_NORMAL_UAP=4096;
	public static final int GROUP_TYPE_NORMAL_OAP=0;
	
	private String groupKey;
	private int groupType;
	
	public ChatGroup(){}
	
	public ChatGroup(String groupKey,int groupType){
		this.groupKey = groupKey;
		this.groupType = groupType;
	}
	
	public String getGroupKey() {
		return groupKey;
	}
	
	public void setGroupKey(String groupKey) {
		this.groupKey = groupKey;
	}
	
	public int getGroupType() {
		return groupType;
	}
	
	public void setGroupType(int groupType) {
		this.groupType = groupType;
	}	
	
	
	public static int getDiscussionGroupType(){
		return 2;
	}
	public static int getNormalGroupType(){
		if(!Configuration.ISUAPAPP){
			return GROUP_TYPE_NORMAL_OAP;
		}
		else return GROUP_TYPE_NORMAL_UAP;
	}
	
	public static int getDepartGroupType(){
		if(!Configuration.ISUAPAPP){
			return 10;
		}
		else return 5106;
	}
	public static int getUntidGroupType(){
		return 20;
	}

	@Override
	public boolean equals(Object o) {
		if(o instanceof ChatGroup){
			ChatGroup group = (ChatGroup)o;
			if(this.groupType==group.groupType
					&&this.groupKey!=null
					&&this.groupKey.equals(group.getGroupKey())){
				return true;
			}
			return false;
		}
		return super.equals(o);
	}

	@Override
	public int hashCode() {
		return super.hashCode();
	}
	
	
	
}